package com.lm.activiti.boot.datatype;

import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableListMultimap;
import com.google.common.collect.Multimaps;
import com.google.common.collect.TreeMultimap;
import com.lm.activiti.boot.cases.StreamDemo;
import com.lm.activiti.boot.cases.dto.ParentProperties;
import org.junit.Test;

import java.util.List;

/**
 * @author lm_jcf
 * @date 2020/4/21 15:31
 */
public class TreeMultimapTest {


    @Test
    public void treeMultimap() {

        List<ParentProperties> dataStack = StreamDemo.getDataStack();

        TreeMultimap<Integer,ParentProperties> treeMultimap = TreeMultimap.create();

        Integer i = new Integer(15);
        Integer i2 = new Integer(15);

//        treeMultimap.put(i, "45");
//        treeMultimap.put(i2, "55");
//        treeMultimap.put(35, "35");

        for (ParentProperties parentProperties : dataStack) {
            treeMultimap.put(parentProperties.getAge(), parentProperties);
        }

        System.out.println(treeMultimap);

    }

    @Test
    public void shift(){

        add(size + 12);
        add(size);
        System.out.println(2 >> 1);
    }

    private int size;

    public void add(int t) {
        System.out.println(t);
    }
}
